class Singleton {

    private static Singleton singleton = new Singleton();

    private Singleton() {

    }

    public static Singleton getSingleton() {

        return singleton;
    }

}


public class Demo {

    public static void main(String[] args) {

//        Singleton singleton = new Singleton();
        Singleton singleton = Singleton.getSingleton();
    }
}
